<div local-class='translation-splash-file'>
  {{#if this.withRevisionLink}}
    <LinkTo @route='logged-in.project.revision.translations' @models={{array @project.id @translation.revision.id}} local-class='language'>
      {{inline-svg 'assets/chevron-left.svg' local-class='back-icon'}}
      {{this.revisionName}}
    </LinkTo>
  {{/if}}

  <h1 local-class='key'>
    <small local-class='key-prefix'>
      {{#if this.translationKey.prefix}}
        {{this.translationKey.prefix}}
      {{else}}
        {{@translation.document.path}}
      {{/if}}
    </small>
    {{this.translationKey.value}}
  </h1>

  <div local-class='badges'>
    {{#if @translation.version}}
      <AccBadge @primary={{true}} local-class='version-tag'>
        {{@translation.version.tag}}
      </AccBadge>
    {{/if}}

    {{#if @translation.plural}}
      <AccBadge @link={{true}}>
        <LinkTo @route='logged-in.project.revision.translations' @models={{array @project.id @translation.revision.id}}>
          {{t 'components.translation_splash_title.plural_label'}}
        </LinkTo>
      </AccBadge>
    {{/if}}

    {{#if @translation.isRemoved}}
      <div local-class='removedBadge'>
        {{t 'components.translation_splash_title.removed_label' removedAt=(time-ago-in-words @translation.updatedAt)}}
      </div>
    {{else if @translation.isConflicted}}
      <AccBadge @link={{this.withRevisionLink}} @primary={{true}}>
        {{#if this.withRevisionLink}}
          <LinkTo @route='logged-in.project.conflicts' @model={{@project.id}} @query={{hash query=@translation.id}}>
            {{t 'components.translation_splash_title.conflicted_label'}}
          </LinkTo>
        {{else}}
          {{t 'components.translation_splash_title.conflicted_label'}}
        {{/if}}
      </AccBadge>
    {{/if}}

    {{#if @translation.revision.isMaster}}
      <AccBadge>
        {{t 'components.translation_splash_title.master_label'}}
      </AccBadge>
    {{/if}}

    {{#if @translation.lintMessages}}
      <AccBadge @warning={{true}} @icon={{true}} class='tooltip tooltip--top' title={{t 'components.translations_list.lint_messages_label' count=@translation.lintMessages.length}}>
        {{inline-svg '/assets/warning.svg'}}
      </AccBadge>
    {{/if}}

    <span local-class='updatedAt'>
      {{t 'components.translation_splash_title.last_updated_label'}}
      <TimeAgoInWordsTag @date={{@translation.updatedAt}} />
    </span>
  </div>
</div>